package com.kongyz.demo2.decorator;

import com.kongyz.demo2.component.Hero;

/**
 * @author kongyz
 * @date 2018/6/28 22:54
 * @Description: 技能栏
 */
public abstract class Skills implements Hero {
    //持有一个英雄
    private Hero hero;

    public Skills(Hero hero) {
        this.hero = hero;
    }

    public void learnSkills() {
        if(hero!=null){
            hero.learnSkills();
        }
    }
}
